<% /* $Id: languages.jsp 132 2011-08-26 10:23:42Z altdotua@gmail.com $ */ %>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ include file="../header.jsp" %>	

<h2 align="center">Languages</h2>

<%= (new LanguagesFormatter()).format(LanguagesModel.getAllEntries()) %>

<%
	LanguageEntry language = LanguagesModel.getEntry(Long.parseLong(request.getParameter("id")));
%>

<h2><%= language == null ? "Add language" : "Edit language \"" + language + "\"" %></h2>

<form action="<%= Linker.link("languages") %>" method="post">
	<input type="hidden" name="action" value="edit">
	<input type="hidden" name="id" value="<%= null == language ? "" : language.getId() %>">
  <p>SID: <input name="sid" value="<%= null == language ? "" : language.getSid() %>"></p>
  <p>Name: <input name="name" value="<%= null == language ? "" : language.getName() %>"></p>
  <p>DJudgeID: <input name="djudgeId" value="<%= (null == language ? "" : language.getDjudgeId()) %>"></p>
  <p><input type="submit" value="Submit"></p>
</form>


<%@ include file="../footer.jsp" %>
